<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/10/11 0011
 * Time: 上午 8:18
 */
header('Content-type:text/html;charset=utf-8');
?>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>双色球</title>
    <style>
        figure{display: block; background: black; border-radius: 50%; height: 40px; width:40px;
                margin:20px 5px; text-align:center; line-height: 38px; color: #ffffff;}
        .red{
            background: -webkit-radial-gradient(10px 10px, circle, #f00, #000);
            background: -moz-radial-gradient(10px 10px, circle, #f00, #000);
            background: -ms-radial-gradient(10px 10px, circle, #f00, #000);
            background: radial-gradient(10px 10px, circle, #f00, #000);
        }
        .blue{
            background: -webkit-radial-gradient(10px 10px, circle, #00f, #000);
            background: -moz-radial-gradient(10px 10px, circle, #00f, #000);
            background: -ms-radial-gradient(10px 10px, circle, #00f, #000);
            background: radial-gradient(10px 10px, circle, #00f, #000);
        }
    </style>
</head>
<body>
         <div class="red">
             <?php
             $red_num=range(1,33);
             $keys=array_rand($red_num,6);
             shuffle($keys);
             foreach($keys as $v){
                 $red[]=$red_num[$v]<10 ? ('0'.$red_num[$v]): $red_num[$v];
             }
             foreach ($red as $v){
                 echo $v.'';
             }
             ?>
         </div>
         <div class="blue">
             <?php
             $blue_num=rand(1,16);
             $blue=$blue_num<10 ? ('0'.$blue_num):$blue_num;
             echo $blue;
             ?>
         </div>
    
</body>
</html>
